<?php
//Lorem Ipsum Functions
//The meat of it all
function site_title() {
	global $db_prefix;
	$query = "SELECT value FROM `$db_prefix"."main` WHERE `option` = 'title'";
	$result = mysql_query($query);
	while($row = mysql_fetch_row($result)) { 
		echo $row[0]; 
	}
}
function site_subtitle() {
	global $db_prefix;
	$query = "SELECT value FROM `$db_prefix"."main` WHERE `option` = 'subtitle'";
	$result = mysql_query($query);
	while($row = mysql_fetch_row($result)) { 
		echo $row[0]; 
	}
}
function LIversion() {
	$ver = get_ver();
	$build = "Black";
	echo "Bazooka $ver : $build";
}
function loginCheck() {
  global $db_prefix;
  $cookie1 = "bazooka_cp";
  $query1 = "SELECT value FROM `$db_prefix"."main` WHERE ( `$db_prefix"."main` . `id` = 5 )LIMIT 1";
  $result1 = mysql_query($query1);
  while($row1 = mysql_fetch_row($result1)) {
		$user = $row1[0];
  }
  $query2 = "SELECT value FROM `$db_prefix"."main` WHERE ( `$db_prefix"."main` . `id` = 6 )LIMIT 1";
  $result2 = mysql_query($query2);
  while($row2 = mysql_fetch_row($result2)) {
		$pass = $row2[0];
  }
  if($_COOKIE[$cookie1] !== "$user$pass") {header("Location: login.php");}
}
function ec($string) { echo $string; }
function get_ver() { return "1.2"; }
function arrayCheck($array){return (count(array_filter($array)) == 0) ? 1 : 0;}
function checkNum($num){return ($num%2) ? TRUE : FALSE;}
?>